package com.atguigu.bigdata.scala.chapter07

object Scala06_Collection_Tuple_1 {

    def main(args: Array[String]): Unit = {

        // TODO 集合 - Tuple
        val t1 : (String, Int, Int) = ("a", 1, 1 )
        val t2 : Tuple3[String, Int, Int] = ("a", 1, 1 )

        // 如果元组中只有2个元素，那么将这样的元组称之为对偶元素，2元组
        // 也称之为键值对
        // "a" -> 1
        val tuple: (String, Int) = "a".->(1)

        val map = Map(
            ("a", 1), ("b", 2), ("c", 3)
        )

        map.foreach( t => {
            println( t._1 + "=" + t._2 )
        })






    }
}
